<ui:composition
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:a4j="http://richfaces.org/a4j"
		xmlns:rich="http://richfaces.org/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:itdep="http://itdep.bsuir.by/jsf"
		xmlns:t="http://myfaces.apache.org/tomahawk"
		>
	<ui:remove>
		<f:loadBundle basename="bundle.common" var="commonBundle"/>
	</ui:remove>
	<a4j:form id="uploadPhotoForm" enctype="multipart/form-data">
		<a4j:commandLink action="#{personPhotoBean.clearUploadData}"
						 value="#{commonBundle.deletePhoto}"
						 rendered="#{not empty personPhoto}"
						 reRender="uploadPhotoForm"
						 styleClass="buttonPhoto"/>
		<t:inputFileUpload id="uploadedFile" required="true" immediate="true" size="2"
						   value="#{personPhotoBean.uploadedFile}"
						   rendered="#{empty personPhoto}"/>
		<rich:spacer width="10"/>
		<br/>
		<h:outputText value="File size restricted!" rendered="#{personPhotoBean.rendFaild}" styleClass="errorMessage"/>
		<h:message for="uploadedFile" styleClass="errorMessage" showSummary="true" showDetail="false"/>
		<br/>
		<h:commandLink action="#{personPhotoBean.submit}"
					   value="#{commonBundle.upload}"
					   rendered="#{empty personPhoto}"
					   styleClass="buttonPhoto"/>
	</a4j:form>

</ui:composition>